import http from '@/api'
import { type Cinema } from '@/api/interface'

export function getCinemaList(data: any) {
  return http.get<Cinema.ListRes>('mall.film-ticket.cinema.list', data)
}

export function getCinemaListRecommend(data: any) {
  return http.get<Cinema.ListRes>('mall.film-ticket.cinema.recommend', data)
}

// 获取影院详情
export function getCinemaInfo(cinemaId: number) {
  return http.get<Cinema.InfoRes>('mall.film-ticket.cinema.info', { cinemaId })
}

// 获取影院电影列表
export function getCinemaFilmList(cinemaId: number) {
  return http.get<Cinema.FilmListRes>('mall.film-ticket.film.cinema-show-film', { cinemaId })
}

// 获取影院电影的排期
export function getCinemaScheduleList(data: { cinemaId: number; filmId: number; date: number }) {
  return http.get<Cinema.ScheduleListRes>('mall.film-ticket.schedule.list', data)
}
